package org.jasig.cas.web.dao;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

/**
 * Created by catold on 16/2/28.
 */
public class SystemDao extends JdbcDaoSupport {
    public boolean isKaptchaOpen() {
        Integer i = 0;
        try {
            i = this.getJdbcTemplate().queryForObject("select s.value from SYSTEM s where s.key='kaptcha'", Integer.class);

        } catch (Exception ex) {
            i = 0;
        }
        return i == 1;
    }
}
